Skip to content

Provide alternative approach for consuming freeRTOS by cmake projects#1397

Open
eMKa94 wants to merge 1 commit intoFreeRTOS:mainfrom
eMKa94:cmake_interface_libraries
Open

Provide alternative approach for consuming freeRTOS by cmake projects#1397
eMKa94 wants to merge 1 commit intoFreeRTOS:mainfrom
eMKa94:cmake_interface_libraries

Conversation

@eMKa94
Copy link
Copy Markdown

@eMKa94 eMKa94 commented Apr 8, 2026

Description

Provide possibility to consume freeRTOS sources as CMake Interface libraries without compromising existing solution.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@archigup
Copy link
Copy Markdown
Member

Hi, could you describe the use case you are looking for? I'm concerned about adding more options to the cmake adding maintenance overhead.

@eMKa94
Copy link
Copy Markdown
Author

eMKa94 commented Apr 16, 2026

Hi, could you describe the use case you are looking for? I'm concerned about adding more options to the cmake adding maintenance overhead.

I've described it a bit here.

It is not only my personal issue... Current FreeRTOS internal CMake is not quite friendly for projects that define multiple different targets ( Like maintaining an ecosystem with many different devices, which is quite common in many companies... ). Reconfiguring the whole CMake project just to set a different port, heap strategy, or simply different compile options is a huge overkill.

My simple solution provides a way to reuse kernel files and select port/heap files per target as many times as the user wants within a single CMake configure operation....

In other words...

add_subdirectory(FreeRTOS) does not need to have HEAP / PORT CMake variables.
It just provides interface libraries for kernel, particular ports and heap strategies.

And any target that need freeRTOS simply link what it needs and have a correct setup with a single CMake Configure operation.

I've decided to share it since a lot of people were saying that it will be cool to have it in the official branch...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants